package com.joker.controller;

import com.joker.pojo.Book;
import com.joker.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/book")
public class Bookcontroller {
    @Autowired
    @Qualifier("BookServiceImpl")
    public BookService bookService;

    @RequestMapping("/add")
    public String addbook(HttpServletRequest request){
        bookService.addbook(new Book(1,"iii","123465","dd"));
        return "index";
    }
}
